Optimal. Leaf size=37 \[ \frac {b x}{2 c}-\frac {b \tanh ^{-1}(c x)}{2 c^2}+\frac {1}{2} x^2 \left (a+b \tanh ^{-1}(c x)\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {6037, 327, 212}
\begin {gather*} \frac {1}{2} x^2 \left (a+b \tanh ^{-1}(c x)\right )-\frac {b \tanh ^{-1}(c x)}{2 c^2}+\frac {b x}{2 c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 327
Rule 6037
Rubi steps
\begin {align*} \int x \left (a+b \tanh ^{-1}(c x)\right ) \, dx &=\frac {1}{2} x^2 \left (a+b \tanh ^{-1}(c x)\right )-\frac {1}{2} (b c) \int \frac {x^2}{1-c^2 x^2} \, dx\\ &=\frac {b x}{2 c}+\frac {1}{2} x^2 \left (a+b \tanh ^{-1}(c x)\right )-\frac {b \int \frac {1}{1-c^2 x^2} \, dx}{2 c}\\ &=\frac {b x}{2 c}-\frac {b \tanh ^{-1}(c x)}{2 c^2}+\frac {1}{2} x^2 \left (a+b \tanh ^{-1}(c x)\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 59, normalized size = 1.59 \begin {gather*} \frac {b x}{2 c}+\frac {a x^2}{2}+\frac {1}{2} b x^2 \tanh ^{-1}(c x)+\frac {b \log (1-c x)}{4 c^2}-\frac {b \log (1+c x)}{4 c^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.01, size = 51, normalized size = 1.38
method | result | size |
derivativedivides | \(\frac {\frac {a \,c^{2} x^{2}}{2}+\frac {\arctanh \left (c x \right ) b \,c^{2} x^{2}}{2}+\frac {b c x}{2}+\frac {b \ln \left (c x -1\right )}{4}-\frac {b \ln \left (c x +1\right )}{4}}{c^{2}}\) | \(51\) |
default | \(\frac {\frac {a \,c^{2} x^{2}}{2}+\frac {\arctanh \left (c x \right ) b \,c^{2} x^{2}}{2}+\frac {b c x}{2}+\frac {b \ln \left (c x -1\right )}{4}-\frac {b \ln \left (c x +1\right )}{4}}{c^{2}}\) | \(51\) |
risch | \(\frac {b \,x^{2} \ln \left (c x +1\right )}{4}-\frac {b \,x^{2} \ln \left (-c x +1\right )}{4}+\frac {a \,x^{2}}{2}+\frac {b x}{2 c}+\frac {b \ln \left (-c x +1\right )}{4 c^{2}}-\frac {b \ln \left (c x +1\right )}{4 c^{2}}\) | \(65\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 50, normalized size = 1.35 \begin {gather*} \frac {1}{2} \, a x^{2} + \frac {1}{4} \, {\left (2 \, x^{2} \operatorname {artanh}\left (c x\right ) + c {\left (\frac {2 \, x}{c^{2}} - \frac {\log \left (c x + 1\right )}{c^{3}} + \frac {\log \left (c x - 1\right )}{c^{3}}\right )}\right )} b \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.34, size = 48, normalized size = 1.30 \begin {gather*} \frac {2 \, a c^{2} x^{2} + 2 \, b c x + {\left (b c^{2} x^{2} - b\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )}{4 \, c^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.18, size = 42, normalized size = 1.14 \begin {gather*} \begin {cases} \frac {a x^{2}}{2} + \frac {b x^{2} \operatorname {atanh}{\left (c x \right )}}{2} + \frac {b x}{2 c} - \frac {b \operatorname {atanh}{\left (c x \right )}}{2 c^{2}} & \text {for}\: c \neq 0 \\\frac {a x^{2}}{2} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 148 vs.
\(2 (31) = 62\).
time = 0.41, size = 148, normalized size = 4.00 \begin {gather*} c {\left (\frac {{\left (c x + 1\right )} b \log \left (-\frac {c x + 1}{c x - 1}\right )}{{\left (\frac {{\left (c x + 1\right )}^{2} c^{3}}{{\left (c x - 1\right )}^{2}} - \frac {2 \, {\left (c x + 1\right )} c^{3}}{c x - 1} + c^{3}\right )} {\left (c x - 1\right )}} + \frac {\frac {2 \, {\left (c x + 1\right )} a}{c x - 1} + \frac {{\left (c x + 1\right )} b}{c x - 1} - b}{\frac {{\left (c x + 1\right )}^{2} c^{3}}{{\left (c x - 1\right )}^{2}} - \frac {2 \, {\left (c x + 1\right )} c^{3}}{c x - 1} + c^{3}}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.73, size = 35, normalized size = 0.95 \begin {gather*} \frac {a\,x^2}{2}-\frac {\frac {b\,\mathrm {atanh}\left (c\,x\right )}{2}-\frac {b\,c\,x}{2}}{c^2}+\frac {b\,x^2\,\mathrm {atanh}\left (c\,x\right )}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________